// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import "babel-polyfill";

import Vue from 'vue';
import App from './App';
import router from './router';

import axios from 'axios';
/*import qs from 'qs';
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
axios.interceptors.request.use((config) => {  //POST传参序列化
  if(config.method  === 'post'){
    config.data = qs.stringify(config.data);
  }
  return config;
},(error) =>{
  alert("错误的传参");
  return Promise.reject(error);
});*/
Vue.prototype.$http = axios;

Vue.config.productionTip = false;

import iView from 'iview';
import 'iview/dist/styles/iview.css';
Vue.use(iView);

/* eslint-disable no-new */
var V = new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
});
